import base64
# -----------------------------------------------
print(base64.b64encode(b"abc"))  # base64如何计算
print(base64.b64decode(b"YWJj"))
# ------------------urlsafe规避了“+”和“/”----
print(base64.urlsafe_b64encode(b"https://"))
print(base64.urlsafe_b64encode(b'i\xb7\x1d\xfb\xef\xff'))  # b'abcd--__'
print(base64.b64encode(b"http://"))
print(base64.b64encode(b'i\xb7\x1d\xfb\xef\xff'))  # b'abcd++//'
